With the continuous development of mobile communications technologies, the rapid increase in network access speed, the development of intelligent mobile terminals, and the ever-increasing optimization of digital compression technologies, mobile terminals have evolved from a simple communication and contact tool to an intelligent multimedia platform. Mobile streaming media is a combination of mobile communication and streaming media transmission. By using streaming media technology to transmit data on mobile terminals via a mobile network, services including video on demand, mobile video chat, and mobile video surveillance are provided to users.
Transcoding is a process in which high-definition ultra-large media files (for example, video files) are compressed into files/flows that are suitable for being played back in some network scenarios (for example, a fiber network, a WIFI network, a 3G network, and the like) or on some terminals (for example, a television, a PC, a mobile phone, a PAD, and the like). Generally, a smaller compressed media file is more suitable for being transmitted in a bandwidth-limited environment, but has poorer image display quality.
An existing transcoding method generally includes: presetting transcoding parameters corresponding to different levels of definition, such that the definition may include the following four levels: smooth, standard definition, high definition and ultra-high definition, and then resolutions and bit-rates that correspond to the four levels of definition may be respectively set; precoding and transcoding a media file based on different levels of definition and according to the set resolutions and bit-rates; and after transcoding based on each level of definition is completed, outputting a media file corresponding to the definition.
The conventional techniques have at least the following problems: in the existing transcoding method, transcoding parameters of a media file need to be analyzed before transcoding, to determine appropriate transcoding parameters such as resolutions and bit-rates. Then, the media file is transcoded according to the parameters obtained after the analysis, and the transcoded media file is output. Generally, a process of analyzing the parameters needs a certain period of time. When a media file needs to be transcoded into media files at different levels of definition, parameters for each level of definition are required to be analyzed, thereby consuming lots of time and reducing the transcoding speed.